1. Field of the Invention
The present invention relates to a program conversion program, a program conversion apparatus and a program conversion method which facilitate the analysis of a program in which a process is different according to the content of an argument.
2. Description of the Related Art
A business application program adapted to systematize an enterprise basic business has a large scale of a program. The business application program has been developed by spending a lot of manpower and time. Further, such a program is maintained and operated for a long period of time. The program is required for a high quality. Further, the program has features that corrections are frequently performed due to change, etc., of business.
Several problems exist in the maintenance of such a program. First, there is a case that a person in charge of the maintenance is replaced. Accordingly, the maintenance of the program cannot depend on a personal skill. Further, the scale of the program is large, and the grasp of the entire image of the program is not easy. A specification does not reflect correctly the present situation of the program in many cases due to perfunctory maintenance. When the program is corrected, it is necessary to perform a large scale of tests to know the influence of the correction.
To deal with these problems, a reverse engineering tool having functions of creating a specification of the program by analyzing the program or extracting call relation among programs data relation, etc., is utilized. For example, to grasp the processing contents of the program in the maintenance of the program, it is frequently performed to show the processing route in the program, the call relation of a subroutine as a call relation diagram.
FIG. 1 is a source code showing an example of a program using an access routine. This program is written by a COBOL language and has a call source program and a call destination program. Here, the call destination program is a subroutine. Further, FIG. 19 is a view showing an example of a call relation diagram displayed by a conventional reverse engineering tool. This call relation diagram is of the program in FIG. 1 and is obtained by the conventional reverse engineering tool.
In the program of FIG. 1, a function of accessing a certain file is realized by one subroutine of the call destination program. Input and output processes, such as a reading process, a writing process, etc., are switched by an argument KUBUN indicating a process partition. In such a case, even when the call relation diagram is merely observed, it cannot be judged if reading is performed or writing is performed there. For example, it cannot be judged from the call relation diagram of FIG. 19 that only an OPEN process is executed in the calling from the previous process. Accordingly, it is necessary that a person confirms by observing the source code of the corresponding position.
Such a view is useful when the process in the subroutine is constant. However, in such a case that the process in the subroutine is changed largely according to an argument, etc., there is a problem that it is not possible to grasp what kind of process is actually executed only by the call relation diagram. Further, a conventional static analysis tool is used for not only the display of the call relation diagram, but also various applications such as an analysis, etc. of input/output of data. However, there is a large problem that the process contents of the program having the process partition cannot be grasped only by this tool. This became a large cause for obstructing development and maintenance works.
As a conventional art relating to the present invention, for example, Patent Document 1 (Jpn. Pat. Appln. Laid-Open Publication No. 2002-215391) is known. To solve the above-mentioned problems, the program analyzing apparatus, program analyzing method and recording medium analyze whether the value of an argument at the call position can be specified. Then, only the route to be executed in the case of this value is extracted, and the call relation diagram is displayed.
However, the technique of the above-mentioned Patent Document 1 needs to perform complicated analysis based on an accurate syntax analysis. Accordingly, it is not easy to remodel an existing reverse engineering tool, such as a call relation diagram generation tool, a program specification generation tool, a program and data relation information extraction tool, a program and data relation information extraction tool, etc., to incorporate the technique of the Patent Document 1 in the existing reverse engineering tool. This technique is not generally used.
Even if the call relation diagram can be displayed, the above-mentioned other reverse engineering tool cannot be utilized.